<template>
    <div class="shop">
        <ShopHeader></ShopHeader>
        <van-tabs v-model="active" color="pink">
            <van-tab to="/shop/foods" title="点餐"></van-tab>
            <van-tab to="/shop/ratings" title="评价"></van-tab>
            <van-tab to="/shop/info" title="详情"></van-tab>
        </van-tabs>
        <router-view></router-view>
       
    </div>
</template>

<script>
import ShopHeader from './ShopHeader/ShopHeader'
export default {
    components:{
        ShopHeader
    },
    data () {
        return {
            active:0
        }
    },
    created () {
        this.$store.dispatch('getFoods')
        this.$store.dispatch('getInfo')
        this.$store.dispatch('getRatings')
    }
};
</script>

<style lang="less" scoped>
.shop{
    height: 100vh;
    background-color: #fff;
    position: relative;
    z-index: 1;
}

</style>

